3.1.44 \(\int \frac {\sec ^3(c+d x)}{a+a \sec (c+d x)} \, dx\) [44]

Optimal. Leaf size=51 \[ -\frac {\tanh ^{-1}(\sin (c+d x))}{a d}+\frac {\tan (c+d x)}{a d}+\frac {\tan (c+d x)}{d (a+a \sec (c+d x))} \]

[Out]

-arctanh(sin(d*x+c))/a/d+tan(d*x+c)/a/d+tan(d*x+c)/d/(a+a*sec(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3875, 3874, 3855, 3879} \begin {gather*} \frac {\tan (c+d x)}{a d}-\frac {\tanh ^{-1}(\sin (c+d x))}{a d}+\frac {\tan (c+d x)}{d (a \sec (c+d x)+a)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^3/(a + a*Sec[c + d*x]),x]

[Out]

-(ArcTanh[Sin[c + d*x]]/(a*d)) + Tan[c + d*x]/(a*d) + Tan[c + d*x]/(d*(a + a*Sec[c + d*x]))

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3874

Int[csc[(e_.) + (f_.)*(x_)]^2/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[1/b, Int[Csc[e + f*x],
 x], x] - Dist[a/b, Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x]

Rule 3875

Int[csc[(e_.) + (f_.)*(x_)]^3/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[-Cot[e + f*x]/(b*f), x
] - Dist[a/b, Int[Csc[e + f*x]^2/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x]

Rule 3879

Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[-Cot[e + f*x]/(f*(b + a*
Csc[e + f*x])), x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {\sec ^3(c+d x)}{a+a \sec (c+d x)} \, dx &=\frac {\tan (c+d x)}{a d}-\int \frac {\sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx\\ &=\frac {\tan (c+d x)}{a d}-\frac {\int \sec (c+d x) \, dx}{a}+\int \frac {\sec (c+d x)}{a+a \sec (c+d x)} \, dx\\ &=-\frac {\tanh ^{-1}(\sin (c+d x))}{a d}+\frac {\tan (c+d x)}{a d}+\frac {\tan (c+d x)}{d (a+a \sec (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(194\) vs. \(2(51)=102\).
time = 0.83, size = 194, normalized size = 3.80 \begin {gather*} \frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \sec (c+d x) \left (\sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )+\cos \left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {\sin (d x)}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}\right )\right )}{a d (1+\sec (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^3/(a + a*Sec[c + d*x]),x]

[Out]

(2*Cos[(c + d*x)/2]*Sec[c + d*x]*(Sec[c/2]*Sin[(d*x)/2] + Cos[(c + d*x)/2]*(Log[Cos[(c + d*x)/2] - Sin[(c + d*
x)/2]] - Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + Sin[d*x]/((Cos[c/2] - Sin[c/2])*(Cos[c/2] + Sin[c/2])*(Cos
[(c + d*x)/2] - Sin[(c + d*x)/2])*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])))))/(a*d*(1 + Sec[c + d*x]))

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 74, normalized size = 1.45

method result size
derivativedivides \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d a}\) \(74\)
default \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d a}\) \(74\)
risch \(\frac {2 i \left ({\mathrm e}^{2 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}+2\right )}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a d}\) \(98\)
norman \(\frac {\frac {\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}+\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {4 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a d}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}\) \(112\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^3/(a+a*sec(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d/a*(tan(1/2*d*x+1/2*c)-1/(tan(1/2*d*x+1/2*c)-1)+ln(tan(1/2*d*x+1/2*c)-1)-1/(tan(1/2*d*x+1/2*c)+1)-ln(tan(1/
2*d*x+1/2*c)+1))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (51) = 102\).
time = 0.30, size = 119, normalized size = 2.33 \begin {gather*} -\frac {\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {2 \, \sin \left (d x + c\right )}{{\left (a - \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a+a*sec(d*x+c)),x, algorithm="maxima")

[Out]

-(log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a - log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a - 2*sin(d*x + c)/((a
 - a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1)) - sin(d*x + c)/(a*(cos(d*x + c) + 1)))/d

________________________________________________________________________________________

Fricas [A]
time = 2.72, size = 97, normalized size = 1.90 \begin {gather*} -\frac {{\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (2 \, \cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right )^{2} + a d \cos \left (d x + c\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a+a*sec(d*x+c)),x, algorithm="fricas")

[Out]

-1/2*((cos(d*x + c)^2 + cos(d*x + c))*log(sin(d*x + c) + 1) - (cos(d*x + c)^2 + cos(d*x + c))*log(-sin(d*x + c
) + 1) - 2*(2*cos(d*x + c) + 1)*sin(d*x + c))/(a*d*cos(d*x + c)^2 + a*d*cos(d*x + c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sec ^{3}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**3/(a+a*sec(d*x+c)),x)

[Out]

Integral(sec(c + d*x)**3/(sec(c + d*x) + 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.46, size = 84, normalized size = 1.65 \begin {gather*} -\frac {\frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} - \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} + \frac {2 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a+a*sec(d*x+c)),x, algorithm="giac")

[Out]

-(log(abs(tan(1/2*d*x + 1/2*c) + 1))/a - log(abs(tan(1/2*d*x + 1/2*c) - 1))/a - tan(1/2*d*x + 1/2*c)/a + 2*tan
(1/2*d*x + 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 - 1)*a))/d

________________________________________________________________________________________

Mupad [B]
time = 0.68, size = 67, normalized size = 1.31 \begin {gather*} \frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^3*(a + a/cos(c + d*x))),x)

[Out]

(2*tan(c/2 + (d*x)/2))/(d*(a - a*tan(c/2 + (d*x)/2)^2)) - (2*atanh(tan(c/2 + (d*x)/2)))/(a*d) + tan(c/2 + (d*x
)/2)/(a*d)

________________________________________________________________________________________